package com.mate.cloud.sensitive.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.ArrayList;
import java.util.List;

/**
 * 加解密配置信息
 *
 * @author: MI
 * @email: 448341911@qq.com
 * @createTime: 2025/2/11 16:34
 * @updateUser: MI
 * @updateTime: 2025/2/11 16:34
 * @updateRemark: 修改内容
 * @version: v1.0
 */
@Data
@ConfigurationProperties(prefix = SensitiveConfigProperties.PREFIX)
public class SensitiveConfigProperties {

    public static final String PREFIX = "spring.sensitive";

    private String type;

    private SecurityProperties security;

    private int maxDeep = 10;

    private List<String> classPackage = new ArrayList<>();


    @Data
    public class SecurityProperties {

        /**
         * @See SecurityMode
         */
        private String mode = "BASE64";

        private String type = "AES";

        private String charset = "UTF-8";

        private String secret = "+6cuvzvyrFZpRG9pf3r7eQ==";

        private String privateKey;

        private String publicKey;
    }

}
